<?php
/**
 * Created by PhpStorm.
 * User: 123
 * Date: 2020/9/16
 * Time: 15:44
 */

namespace app\admin\controller;


use app\service\CrondService;
use think\App;
use think\Controller;
use think\Db;

/**
 * 定时扣除微信支付宝手续费.
 * @author   juzi
 * @blog    https://blog.csdn.net/juziaixiao
 * @version  0.0.1
 * @datetime 2020年7月22日10:57:35
 */
class CrondApi extends Controller
{

    public function __construct(App $app = null)
    {
    parent::__construct($app);
    }

    public function SetDecIncome(){
        dump(strtotime('-1day'));exit;

        //查找今天的所有收入--》分类后--》*千分之八--》将结果存到log_cost中
        //*   *   *   *  *  curl -H "Content-Type: application/json" -s -X POST  "http://192.168.1.128:8081/admin/CrondApi/SetDecIncome" >>/data/wwwroot/leebridge/public/1.txt
        $re=CrondService::CrondCost();
        return json($re);
    }
}